import AjaxSend from '@/pages/micro/ajax/http';
/**
 * @Template 服务模板示例
 * interface:{  定义请求的名称，请保持唯一
 *  method: string, 请求方式（get、delete、head、post、put、patch）
 *  requestUrl: string, 请求的服务地址（在接口地址中'不'包含参数下使用，例如：'api/v1/user/'）
 *  requestCommon: function, 请求的服务地址（在接口地址中包含参数下使用，例如：'api/v1/users/' + params + '/active'）
 *  requestPost: function  返回对象类型，可以自己定义。（主要用于post请求也需要在url上面传参的方式；例如：'api/v1/user?id=param'，同时也有在body传参）
 * }
 */
const PublicObjService = {
  metaMenu: {
    requestUrl: '/mianalysis/micro/base/select/meta/menu',
    method: 'get'
  },
  microTable:{
    requestUrl: '/mianalysis/micro/base/select/meta/list',
    method: 'get'
  },
  selectedPeriod:{
    requestUrl: '/mianalysis/micro/base/select/period',
    method: 'get'
  },
  selectedSlaveTable:{
    requestUrl: '/mianalysis/micro/base/select/slave/table',
    method: 'get'
  },
  getSelectedTableIden:{
    requestUrl: '/mianalysis/micro/base/select/iden/meta',
    method: 'get'
  },
  getIdentList:{
    requestUrl: '/mianalysis/micro/base/select/ident/list',
    method: 'get'
  },
  getIdentVersion:{
    requestUrl:'/mianalysis/micro/base/select/ident/version',
    method:'get'
  },
  getIdentValue:{
    requestUrl:'/mianalysis/micro/base/select/ident/value',
    method:'get'
  },
  addAchievement:{
    requestUrl:'/mianalysis/micro/achievement/add/achievement',
    method:'post'
  },
  queryAchievement:{
    requestUrl:'/mianalysis/micro/achievement/select/achievement/by/type',
    method:'get'
  },
  deleteAchievement:{
    requestUrl:'/mianalysis/micro/achievement/delete/achievement/by/id',
    method:'delete'
  },
  getAchievementInfo:{
    requestUrl:'/mianalysis/micro/achievement/select/achievement/by/id',
    method:'get'
  },
  selectRoot:{
    requestUrl:'/mianalysis/micro/base/select/root/ident/value',
    method:'get'
  },
  selectAlias:{
    requestUrl:'/mianalysis/micro/base/select/iden/by/alias',
    method:'get'
  },
  quickQuery:{
    requestUrl:'/mianalysis/micro/query/quickQuery',
    method:'get'
  },
  getRegionInfo:{
    requestUrl: '/region/region/info/query/regionByCodes',
    method: 'get'
  },
  getBuildDWList:{
    requestUrl: '/mianalysis/micro/query/select/jzw/dw',
    method: 'get'
  },
  getBuildDWInfo:{
    requestUrl: '/mianalysis/micro/query/select/jzw/dw/info',
    method: 'get'
  },
  getIdenByWords:{
    requestUrl: '/mianalysis/micro/query/select/iden/by/words',
    method: 'get'
  }
};

AjaxSend.loopServiceApi(PublicObjService);
export function getIdenByWords(params) {
  return PublicObjService.getIdenByWords.send(params);
}
export function getBuildDWInfo(params) {
  return PublicObjService.getBuildDWInfo.send(params);
}
export function getBuildDWList(params) {
  return PublicObjService.getBuildDWList.send(params);
}
export function metaMenu(params) {
  return PublicObjService.metaMenu.send(params);
}
export function microTable(params) {
  return PublicObjService.microTable.send(params);
}
export function selectedPeriod(params) {
  return PublicObjService.selectedPeriod.send(params);
}
export function selectedSlaveTable(params) {
  return PublicObjService.selectedSlaveTable.send(params);
}
export function getSelectedTableIden(params) {
  return PublicObjService.getSelectedTableIden.send(params);
}
export function getIdentList(params) {
  return PublicObjService.getIdentList.send(params);
}
export function getIdentVersion(params) {
  return PublicObjService.getIdentVersion.send(params);
}
export function getIdentValue(params) {
  return PublicObjService.getIdentValue.send(params);
}
export function addAchievement(params) {
  return PublicObjService.addAchievement.send(params);
}
export function queryAchievement(params) {
  return PublicObjService.queryAchievement.send(params);
}
export function deleteAchievement(params) {
  return PublicObjService.deleteAchievement.send(params);
}
export function getAchievementInfo(params) {
  return PublicObjService.getAchievementInfo.send(params);
}
export function selectRoot(params) {
  return PublicObjService.selectRoot.send(params);
}
export function selectAlias(params) {
  return PublicObjService.selectAlias.send(params);
}
export function quickQuery(params) {
  return PublicObjService.quickQuery.send(params);
}
export function getRegionInfo(params) {
  return PublicObjService.getRegionInfo.send(params);
}


